package com.hissy.common.design.action.strategy;

/**
 * Created by zhangyanfei on 2019/4/10.
 * 可以动态的改变对象的行为
 * @author zhangyanfei
 * @date 2019/04/10
 */
public class Context {

    private Strategy strategy;

    public Context(Strategy strategy) {
        this.strategy = strategy;
    }

    public void setContext(Strategy strategy) {
        this.strategy = strategy;
    }

    public void operate() {
        strategy.operate();
    }
}
